package cn.batch.daemon.hibernate.dao;

// Generated 2012-10-29 14:03:03 by Hibernate Tools 3.4.0.CR1

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import cn.batch.daemon.hibernate.bean.BatchRiskData;

/**
 * Home object for domain model class PbocSummary.
 * 
 * @see cn.batch.daemon.hibernate.bean.PbocSummary
 * @author Hibernate Tools
 */
public class BatchRiskDataDao extends HibernateDaoSupport {
	private static final Log log = LogFactory.getLog(BatchRiskDataDao.class);

	protected void initDao() {
		// do nothing
	}

	public void save(BatchRiskData transientInstance) {
		log.debug("saving BatchRiskData instance");
		try {
			getHibernateTemplate().save(transientInstance);
			log.debug("save successful");
		} catch (RuntimeException re) {
			log.error("save failed", re);
			throw re;
		}
	}

	public List<BatchRiskData> queryByExample(BatchRiskData transientInstance) {
		try {
			@SuppressWarnings("unchecked")
			List<BatchRiskData> list = getHibernateTemplate().findByExample(transientInstance);
			return list;
		} catch (RuntimeException re) {
			throw re;
		}
	}
	
	public void delete(BatchRiskData transientInstance) {
		log.debug("delete BatchRiskData instance");
		try {
			getHibernateTemplate().delete(transientInstance);	
			log.debug("delete successful");
		} catch (RuntimeException re) {
			log.error("delete failed", re);
			throw re;
		}
					
	}
	
}
